<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j" xmlns:p="http://primefaces.org/ui"
	xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
	xmlns:h="http://java.sun.com/jsf/html">
	 <h:head>
        <!-- Head Content -->
   </h:head>
	<div class="row">
		<div class="col-md-12">
			<h:form role="form" id="form">
			<div class="box box-primary">
				<div class="box-header">
					<h3 class="box-title">New Code</h3>
					 <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
				</div>
				
					<div class="box-body">
						<div class="form-group">
							<h:outputLabel value="Import File Excel:" />
							<p:fileUpload fileUploadListener="#{managerCodeBean.upLoadFile}"
								mode="advanced" update="form" auto="true" allowTypes="/(\.|\/)(xls|xlsx)$/" />
						</div>
						<div class="form-group" style="#{managerCodeBean.visitInput}">
							<h:outputLabel value="Code ID:" for="codeNo" />
							<h:inputText styleClass="form-control" id="codeNo"
								pt:placeholder="DH10DT" />
						</div>
						<div class="form-group" style="#{managerCodeBean.visitInput}" >
							<h:outputLabel value="Code Name:" />
							<h:inputText styleClass="form-control" id="codeName"
								pt:placeholder="Công Nghệ Thông Tin 2010" />
						</div>
						<div class="panel panel-default" style="#{managerCodeBean.visitListCode}">
							<!-- Default panel contents -->
							<div class="panel-heading">Choose Code:</div>

							<!-- Table -->
							<h:selectManyCheckbox value="#{managerCodeBean.selectedCode}"
								layout="pageDirection" styleClass="table" style="padding: 2px;">
								<f:selectItems value="#{managerCodeBean.codesAdd}" var="code"
									itemLabel="#{code.codeNo }" itemValue="code" />

							</h:selectManyCheckbox>
						</div>
					</div>
					<!-- /.box-body -->

					<div class="box-footer">
						<h:commandButton action="#{managerCodeBean.addCode}" styleClass="btn btn-primary" value="Add" >
							<p:ajax update="form"></p:ajax>
						</h:commandButton>
					</div>
				


			</div>
			</h:form>
			<!-- /.box -->
		</div>
	</div>
	<!-- /.row (main row) -->




</ui:composition>
